package com.kitchen.ui.dialog.com
{
	import com.kitchen.AbstractIcon;
	
	import flash.display.BitmapData;
	import flash.geom.Point;
	import flash.geom.Rectangle;

	internal class RectangleIcon extends AbstractIcon
	{
		private static var bitdata:BitmapData;
		
		public function RectangleIcon(bitmapData:BitmapData)
		{
			super(bitmapData);
		}
		
		override protected function cutRec(bitmapData:BitmapData):BitmapData{
			this.w = 190;
			this.h = 32;
			if(RectangleIcon.bitdata == null){
				var rec:Rectangle = new Rectangle(813, 130, this.w, this.h);
				var cbitdata:BitmapData = new BitmapData(this.w, this.h);
				cbitdata.copyPixels(bitmapData, rec, new Point());
				RectangleIcon.bitdata = cbitdata;
			}
			return RectangleIcon.bitdata;
		}
	}
}